<%
	var currentdate = new Date();
	var date = currentdate.getFullYear() + '-' + (((currentdate.getMonth() + 1) < 10 ) ? '0'+ (currentdate.getMonth() + 1 ) : (currentdate.getMonth() + 1)) + '-' + ((currentdate.getDate() < 10)? '0' + currentdate.getDate() : currentdate.getDate());
	var time = currentdate.getHours() + ':' + (currentdate.getMinutes() < 10 ? '0' : '') + currentdate.getMinutes();
	if (!_.isUndefined(this.model.attributes.due_date) && this.model.attributes.due_date !== null && this.model.attributes.due_date !== 'NULL') {
		var date_time = this.model.attributes.due_date.replace('T',' ');
		date_time = date_time.split(' ');
		date = date_time[0];
		time = date_time[1];
		time = time.split(':');
		time = time[0]+':'+time[1];
	}
%>
<div class="form-group">
	<div class="col-xs-6">
		<label><%- i18next.t('Date') %>
		</label>
		<input type="text" class="form-control input-sm js-card-duedate-edit-<%=card.attributes.id%>" name="due_date" data-format="yyyy-MM-dd" value="<%= date %>" required>
	</div>
	<div class="col-xs-6">
		<label><%- i18next.t('Time') %>
		</label>
		<input type="text" class="form-control input-sm js-card-duetime-edit-<%=card.attributes.id%>" name="due_time" data-format="hh:mm" value="<%= time %>" required>
	</div>
</div>
<div class="form-group">
	<div class="col-xs-6">
		<label for="save" class="sr-only"><%- i18next.t('Save') %>
		</label>
		<input type="submit" value="<%- i18next.t('Save') %>" id="save" class="btn btn-primary" id="submitCardDueDateEditForm">
	</div>
	<% if(!_.isEmpty(card.attributes.due_date) && card.attributes.due_date != 'NULL') { %>
	<div class="col-xs-6">
		<label for="remove" class="sr-only"><%- i18next.t('Remove') %>
		</label>
		<input type="reset" value="<%- i18next.t('Remove') %>" class="btn btn-default js-remove-due-date">
	</div>
	<% } %>
</div>